// 菜单接口
import request from '@/utils/request'

const api = {
    caidanTree:'/cms/sysMenu/queryTreeList',
    mokuaiTree:'/cms/sysModule/queryPageList',
    sava:'/cms/sysMenu/save',
    deletecaidan:'/cms/sysMenu/remove',
    getid:'/cms/sysMenu/get'
  }
  //获取列表
  export function caidanTree (parameter) {
    return request({
      url: api.caidanTree,
      method: 'post',
      data: parameter
    })
  }
  //获取模块
  export function mokuaiTree (parameter) {
    return request({
      url: api.mokuaiTree,
      method: 'post',
      data: parameter
    })
  }
  //新增菜单
  export function sava (parameter) {
    return request({
      url: api.sava,
      method: 'post',
      data: parameter
    })
  }
  //删除菜单
  export function deletecaidan (parameter) {
    return request({
      url: api.deletecaidan,
      method: 'post',
      data: parameter
    })
  }
  //通过ID获取
  export function getid (parameter) {
    return request({
      url: api.getid,
      method: 'post',
      data: parameter
    })
  }
  